package com.hejing.static关键字;

/**
 * ClassName: Circle
 * Package: com.hejing.static关键字
 * Description:
 *
 * @Author: HeJing
 * @Create: 2023-03-27 22:12
 * @Version: 1.0
 */
public class Circle {
    private double radius;  // 实例变量
    private int id;     // 编号

    private static int total;  // 创建的Circle实例的个数

    private static int init = 1001;

    public Circle() {
        this.id = init;
        init++;
        total++;
    }

    @Override
    public String toString() {
        return "Circle{" +
                "radius=" + radius +
                ", id=" + id +
                '}';
    }
}
















